package com.tuanzi.loan.vo.response.family;

import com.tuanzi.loan.core.vo.IdentityResponse;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * ICP备案网站评论 SearchResponse
 * @author JinRuiyang 2017/12/13 11:57:08
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class IcpWebCommentSearchResponse extends IdentityResponse {

    // 主键
    private Long pk;

    // 评论时间
    private String createTime;

    // 合作方名
    private String productName;

    // 用户昵称
    private String userName;

    // 评论内容
    private String content;

    // 状态
    private Integer status;

    // 是否可用
    private Integer isEnable;

    public String getIcon(){
        if (status == 1 && isEnable == 1)
            return "fa fa-eye";
        else return "fa fa-eye-slash";
    }

    public boolean isPublish(){
        return status == 1;
    }

    public boolean isEnable(){
        return isEnable == 1;
    }

    public String getStatusStr(){
        return status == 1 ? "已发布" : "未发布";
    }

    public String isEnableStr(){
        return isEnable == 1 ? "未删除" : "已删除";
    }
}
